package com.luo.bbs.front.webapi.service.impl;//package com.luo.front.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.bbs.front.service.IBuildingService;
import com.luo.bbs.front.webapi.mapper.BuildingMapper;
import com.luo.pojo.Building;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author bin.cn
 * @since 2023-01-19
 */
@Service
public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> implements IBuildingService {

    @Autowired
    private BuildingMapper buildingMapper;

    @Override
    public List<Building> getAll() {
        List<Building> buildings = buildingMapper.selectList(new QueryWrapper<Building>().eq("enabled",1));
        return buildings;
    }
}
